<template>
<div>
    <div v-for="(item,index) in userlist" :key="index" >
        <tr>
            <td>用户名:{{item.username}}</td>
        </tr>
        <tr>
            <Button type="submit" @click="userup(item.username)">升级</Button>
        </tr>

    </div>
</div>
</template>

<script>
export default {
    data () {
        return {
            userlist:[]
        }
    },
    methods: {
         showuser(){
             this.axios.get('http://127.0.0.1:8000/myupup/myupdeuser/',{params:{'username':this.username,'password':this.password}})
             .then(result=>{
                 this.userlist=result.data.message
                 console.log(result)
            
             })      
       },
       userup(username){
            this.axios.get('http://127.0.0.1:8000/myupup/myupdeup/',{params:{'username':username}})
             .then(result=>{
               
                 console.log(result)
            
             })      

       }
        
    },
    mounted() {
        this.showuser()
    },

}
</script>

<style>

</style>
